package com.jsh.ex.config;

import com.jsh.ex.convert.PagerConverter;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import org.springframework.format.FormatterRegistry;

/**
 * Created by wukai on 2017/9/11.
 */
@Configuration
public class ConvertConfig extends WebMvcConfigurerAdapter {
    @Override
    public void addFormatters(FormatterRegistry registry) {// 1
        registry.addConverter(new PagerConverter());// 2
    }
}
